﻿//Class of parameters for array generation
namespace Diplom.Utilities
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;


    public class Parameters
    {
        #region Fields
        
        /// <summary>
        /// Амплитуда
        /// </summary>
        double amplitude;

        /// <summary>
        /// Частота
        /// </summary>
        double frequency;

        /// <summary>
        /// Фаза
        /// </summary>
        double phase;

        /// <summary>
        /// Размер массива
        /// </summary>
        int length;

        /// <summary>
        /// Начало отрезка
        /// </summary>
        double begin;

        /// <summary>
        /// Конец отрезка
        /// </summary>
        double end;

        #endregion

        #region Methods

        /// <summary>
        /// Constructors
        /// </summary>
        private Parameters()
        {
            amplitude = 1.0;
            frequency = 1.0;
            phase = 0.0;
            begin = 0.0;
            end = 1.0;
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="frequency"></param>
        private Parameters(int length, double frequency)
            : this()
        {
            this.length = length;
            this.frequency = frequency;
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="frequency"></param>
        /// <param name="phase"></param>
        private Parameters(int length, double frequency, double phase)
            : this(length, frequency)
        {   
            this.phase = phase;
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="frequency"></param>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        public Parameters(int length, double frequency, double begin, double end)
            : this()
        {
            this.length = length;
            this.frequency = frequency;
            this.begin = begin;
            this.end = end;
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="frequency"></param>
        /// <param name="phase"></param>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        public Parameters(int length, double frequency, double phase, double begin, double end)
            : this()
        {
            this.length = length;
            this.frequency = frequency;
            this.phase = phase;
            this.begin = begin;
            this.end = end;
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="frequency"></param>
        /// <param name="phase"></param>
        /// <param name="amplitude"></param>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        public Parameters(int length, double frequency, double phase, double amplitude, double begin, double end)
            : this()
        {
            this.length = length;
            this.frequency = frequency;
            this.phase = phase;
            this.amplitude = amplitude;
            this.begin = begin;
            this.end = end;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Амплитуда
        /// </summary>
        public double Amplitude
        {
            get
            {
                return amplitude;
            }
            set
            {
                amplitude = value;
            }
        }

        /// <summary>
        /// Частота
        /// </summary>
        public double Frequency
        {
            get
            {
                return frequency;
            }
            set
            {
                frequency = value;
            }

        }

        /// <summary>
        /// Фаза
        /// </summary>
        public double Phase
        {
            get
            {
                return phase;
            }
            set
            {
                phase = value;
            }
        }

        /// <summary>
        /// Длина
        /// </summary>
        public int Length
        {
            get
            {
                return length;
            }
            set
            {
                length = value;
            }
        }

        /// <summary>
        /// Begin
        /// </summary>
        public double Begin
        {
            get
            {
                return begin;
            }
            set
            {
                begin = value;
            }
        }

        /// <summary>
        /// End
        /// </summary>
        public double End
        {
            get
            {
                return end;
            }
            set
            {
                end = value;
            }
        }

        #endregion

    }
}
